<{include file='../common/head.tpl'}>
<style>
<!--
.titlist{padding:10px; display:block;}
.titlist a{ display:block; clear:both; height:44px; line-height:44px; text-align:left; font-family:"微软雅黑"; font-size:24px; color:#000;}
.titlist a.dq{ color:#b73632}
-->
</style>
<div class="main w1060">
    	<div class="onemain" style="margin-bottom:20px;">
            <form name="form2" method="get" action="/benchmark/all">
                问卷：<select name="question_id" autocomplete="off" onchange="this.form.submit();">
                        <{foreach $question_list as $key => $val}>
                        <option value="<{$val.question_id}>" <{if $val.question_id==$question_id}>selected="selected"<{/if}> ><{$val.question_name}></option>
                        <{/foreach}>
                </select>
                        指标：<select name="subject_id" autocomplete="off" onchange="this.form.submit();">
                            <option value="0">所有指标</option>
                            <{foreach $show_subject_list as $key => $val}>
                            <option value="<{$val.subject_id}>" <{if $subject_id==$val.subject_id}>selected="selected"<{/if}>><{$val.title}></option>
                            <{/foreach}>
                        </select>
                        分/支：<select name="next_network_id" autocomplete="off" onchange="this.form.submit();">
                            <option value="0">所有</option>
                            <{foreach $next_network as $key => $val}>
                            <option value="<{$val.network_id}>" <{if $next_network_id==$val.network_id}>selected="selected"<{/if}>><{$val.network_name}></option>
                            <{/foreach}>
                        </select>
                        <{if $nlist}>
                        网点：<select name="nq_id" autocomplete="off" onchange="this.form.submit();">
                            <option value="0">所有网点</option>
                            <{foreach $nlist as $key => $val}>
                            <option value="<{$key}>" <{if $nq_id==$key}>selected="selected"<{/if}>><{$val}></option>
                            <{/foreach}>
                    </select>
                    <{/if}>
		<div class="clerbox"></div>
            </form>
	</div>
	<div class="biaoge">   
	<h2 class="wjtit"><{$question_info.question_name}></h2>
	<p class="wjbh"><label>问卷编号</label><{$question_info.identifier}></p>
	
	<table width="100%" border="0" cellspacing="0">
	  <tr>
		<td width="70%"><strong>指标</strong></td>
		<td width="15%"><strong>标准分</strong></td>
                <td width="15%"><strong>选项</strong></td>
	  </tr>
          <{foreach $subject_list as $key => $val}>
          <{if isset($network_subject_answer[$val.subject_id])}>
          <tr style="background: #2D93CA">
              <td>
                  <{$val.question_num}><{$val.title}><br/>
                  <{$val.content}> 
              </td>
              <td><{$val.standard_score}></td>
              <td>
                  <{if $question_option[$val.subject_id]}>
                    <{foreach $question_option[$val.subject_id] as $option_key => $option_val}>
                            <{$option_key}>:<{$option_val}><br/>
                    <{/foreach}>
                  <{/if}></td>
	  </tr>
          <tr>
              <td colspan="3">
                  <table width="100%" border="0" cellspacing="0">
                      <th width="20%">网点名称</th>
                      <th width="40%">情景描述</th>
                      <th width="10%">得分</th>
                      <th width="10%">选项值</th>
                      <th width="20%">操作</th>
                       <{foreach $network_subject_answer[$val.subject_id] as $k => $v}>
                       <{if isset($netquestion_name[$v.nq_id])}>
                        <tr>
                            <td><b><{$netquestion_name[$v.nq_id]}></b> </td>
                            <td> <{$v.answer_desc}></td>
                            <td><{$v.answer_score}></td>
                            <td><{$v.answer_option}></td>
                            <td>
                            <{if $benchmark_list[$val.subject_id][$v.nq_id]}><a href="javascript:void(0);" onclick="history(<{$v.nq_id}>,<{$val.subject_id}>);return false;">历史</a><{/if}> 
                            <a href="javascript:void(0);" onclick="suggest(<{$v.nq_id}>,<{$val.subject_id}>);return false;">操作</a>
                            </td>
                        </tr>
                        <{/if}>
                        <{/foreach}>
                  </table>
              </td>
          </tr>
          <{/if}>
          <{/foreach}>
	</table>
  </div>
</div>

<script type="text/javascript">
//问题对标的历史
function history(nq_id, subject_id){
    $.layer({
        type: 2, 
        title: '网点对标历史记录',
        border:[10, 0.3, '#000'],
        closeBtn:[0, true],
        shade: [0.5, '#000'],
        offset: ['100px', ''],
        area: ['800px', '450px'],
        iframe: {src: '/benchmark/history?nq_id='+nq_id+'&subject_id='+subject_id}
    });
}

//上级网点给出意见
function suggest(nq_id,subject_id){
    $.layer({
        type: 2,
        title: '审核意见',
        closeBtn: [0, true],
        shade: [0.5, '#000'],
        border:[10, 0.3, '#000'],
        offset: ['100px',''],
        area: ['500px', '400px'],
        iframe: {src: '/benchmark/suggest?nq_id='+nq_id+'&subject_id='+subject_id}
    });   
}
</script>
<{include file="../common/footer.tpl"}>